<template>
  <div>
    <el-dialog
      title="视频展示"
      width="50%"
      :visible.sync="helpDialogVisible"
      class="showDialogClass"
      :before-close="handleClose"
      append-to-body
    >
    <el-row :gutter="20">
      <el-col :span="5">
        <div class="grid-content bg-purple"></div>
      </el-col>
      <el-col :span="14">
        <video :src="videoSrc" controls="" style="width:100%" />
        <h1>{{ textTitle }}</h1>
        <p style="font-size:15px">简介：{{ description }}</p>
        <br/>
        <p style="color:#96a5b4;">标签：{{ textLabel }} &emsp;</p>
      </el-col>
      <el-col :span="5">
        <div class="grid-content bg-purple"></div>
      </el-col>
    </el-row>
      <span
        slot="footer"
        class="dialog-footer"
      >
        <el-button @click="helpDialogVisible = false"> 取消 </el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    name: `helpTextSearchDialog`,
    data () {
      return {
        helpDialogVisible: false,
        videoSrc: ``,
        textTitle: ``,
        textLabel: ``,
        description: ``,
      }
    },
    methods: {
      inits (item) {
        this.helpDialogVisible = true;
        this.videoSrc = item.textVideo
        this.textLabel = item.textLabel
        this.textTitle = item.textTitle
        this.description = item.description;
      },
      handleClose () {
        this.cancel()
      },
      cancel () {
        this.helpDialogVisible = false
      },
    },
  }
</script>

<style>
>>>.el-dialog {
  width: 100% !important;
  height: 100% !important;
}

.el-col {
  border-radius: 4px;
}

.bg-purple {
  background: #fff;
}

.grid-content {
  border-radius: 4px;
  min-height: 36px;
}

.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>
